package br.com.sovi.gwt.client.component.mainmenu;

public enum MainMenuOptionsEnum {

	INICIO("Início", "inicio"), RASTREAMENTO("Rastreamento", "rastreamento"), HISTORICO("Histórico", "historico"), CERCA(
			"Cerca", "cerca"), PESQUISA("Pesquisa", "pesquisa"), CONTATO("Contato", "contato");

	private String label;

	private String token;

	private MainMenuOptionsEnum(String label, String token) {
		this.label = label;
		this.token = token;
	}

	public static MainMenuOptionsEnum getByToken(String token) {
		MainMenuOptionsEnum[] values = values();

		for (int i = 0; i < values.length; i++) {
			MainMenuOptionsEnum mainMenuOptionsEnum = values[i];

			if (mainMenuOptionsEnum.getToken().equals(token)) {
				return mainMenuOptionsEnum;
			}
		}
		
		return null;
	}

	public String getToken() {
		return token;
	}

	public String getLabel() {
		return label;
	}

}
